package cn.edu.nuaa.model;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * @TableName record
 */
public class Record implements Serializable {
    /**
     *
     */
    private Integer recordId;

    /**
     *
     */
    private Long userId;

    /**
     *
     */
    private Long bookId;

    /**
     *
     */
    private Date borrowTime;

    /**
     *
     */
    private Date remandTime;

    /**
     *
     */
    private String recordStatus;

    private static final long serialVersionUID = 1L;

    /**
     *
     */
    public Integer getRecordId() {
        return recordId;
    }

    /**
     *
     */
    public void setRecordId(Integer recordId) {
        this.recordId = recordId;
    }

    /**
     *
     */
    public Long getUserId() {
        return userId;
    }

    /**
     *
     */
    public void setUserId(Long userId) {
        this.userId = userId;
    }

    /**
     *
     */
    public Long getBookId() {
        return bookId;
    }

    /**
     *
     */
    public void setBookId(Long bookId) {
        this.bookId = bookId;
    }

    /**
     *
     */
    public Date getBorrowTime() {
        return borrowTime;
    }

    /**
     *
     */
    public void setBorrowTime(Date borrowTime) {
        this.borrowTime = borrowTime;
    }

    /**
     *
     */
    public Date getRemandTime() {
        return remandTime;
    }

    /**
     *
     */
    public void setRemandTime(Date remandTime) {
        this.remandTime = remandTime;
    }

    /**
     *
     */
    public String getRecordStatus() {
        return recordStatus;
    }

    /**
     *
     */
    public void setRecordStatus(String recordStatus) {
        this.recordStatus = recordStatus;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Record other = (Record) that;
        return (this.getRecordId() == null ? other.getRecordId() == null : this.getRecordId().equals(other.getRecordId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getBookId() == null ? other.getBookId() == null : this.getBookId().equals(other.getBookId()))
            && (this.getBorrowTime() == null ? other.getBorrowTime() == null : this.getBorrowTime().equals(other.getBorrowTime()))
            && (this.getRemandTime() == null ? other.getRemandTime() == null : this.getRemandTime().equals(other.getRemandTime()))
            && (this.getRecordStatus() == null ? other.getRecordStatus() == null : this.getRecordStatus().equals(other.getRecordStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRecordId() == null) ? 0 : getRecordId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getBookId() == null) ? 0 : getBookId().hashCode());
        result = prime * result + ((getBorrowTime() == null) ? 0 : getBorrowTime().hashCode());
        result = prime * result + ((getRemandTime() == null) ? 0 : getRemandTime().hashCode());
        result = prime * result + ((getRecordStatus() == null) ? 0 : getRecordStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", recordId=").append(recordId);
        sb.append(", userId=").append(userId);
        sb.append(", bookId=").append(bookId);
        sb.append(", borrowTime=").append(borrowTime);
        sb.append(", remandTime=").append(remandTime);
        sb.append(", recordStatus=").append(recordStatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
